package ride

import (
	"math"
)

// Ride 乘车
type Ride struct {
	Distance Distance
	Idle     int
}

// Price 本次乘车应付金额
func (r Ride) Price() int {
	return int(math.Floor(r.Distance.Price() + float64(r.Idle)*0.25 + 0.5))
}
